{layout name="p/base"}
  <div id="page-wrapper">
    <div class="row">
      <div class="col-lg-12">
        <h1>房车管理 <small>房车信息录入</small></h1>
        <ol class="breadcrumb">
          <li><a href="index.php"><i class="fa fa-dashboard"></i> 管理首页</a></li>
          <li><a href="/caravan"><i class="fa fa-dashboard"></i> 房车信息列表</a></li>
          <li class="active"><i class="fa fa-table"></i> 房车信息录入基础模板</li>
        </ol>
        <div class="alert alert-success alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          在这里可以创建房车信息
        </div>
      </div>
    </div>
    <!-- /.row -->
    <div class="row">
      <!-- 选项卡start -->
      <div class="bs-example">
        <!-- 选项卡标题start -->
        <ul class="nav nav-tabs" style="margin-bottom:15px;">
          <li class="active">
            <a href="#one" data-toggle="tab">基本信息</a>
          </li>
          <li>
            <a href="#two" data-toggle="tab">车型参数</a>
          </li>
        </ul>
        <!-- 选项卡标题end -->
        <!-- 选项卡内容start -->
        <div id="myTabContent" class="tab-content">
          <!-- 选项卡内容1start -->
          <div id="one" class="tab-pane fade active in">
            <form class="form-horizontal" role="form" action="/caravan" method="post">
              <!-- 基本信息start -->
              <div class="col-lg-6">
                <div class="panel panel-default">
                  <div class="panel-heading ">
                    <h3 class="panel-title">
                      基本信息
                    </h3>
                  </div>
                  <div class="panel-body">
                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">房车编号</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" name="number" id="firstname" value="" 
                            placeholder="请正确填写车系编号">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">房车名称</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" name="name" id="firstname" value="" 
                            placeholder="请填写车系名称">
                      </div>
                    </div>
                    
                    <div class="form-group ">
             
                      <label for="firstname" class="control-label col-sm-3">生产厂家</label>
                      <div class="col-sm-9">
                      <select class="form-control" name="car_renders_id">                  
                      {volist name='rvrend' id='vo' }
                      {if $list.factory==$vo.id}
                        <option value={$vo.id} selected='true' >{$vo.name}</option>
                      {else} 
                        <option value={$vo.id}  >{$vo.name}</option>
                      {/if}
                      {/volist}
                      </select>
                      </div>
                    </div>
                    <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-3">车辆品牌</label>
                      <div class="col-sm-9">
                      <select class="form-control" name="car_brands_id">
                      {volist name='brand' id='vo'}
                      {if $list.brand==$vo.id}
                        <option value={$vo.id} selected='true'>{$vo.name}</option>
                      {else} 
                        <option value={$vo.id} >{$vo.name}</option>
                      {/if}
                      {/volist}
                      </select>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="control-label col-sm-3">车型</label>
                      <div class="col-sm-9">
                      <select class="form-control" name="car_cates_id">
                       {foreach $cartype as $k => $type}
                       {if $list.model==$k}
                       <option value={$k} selected='true'>{$type}</option>
                       {else}
                       <option value={$k} >{$type}</option>
                       {/if}
                       {/foreach}
                      </select>
                      </div>
                    </div>

                    <div class="form-group">
                      <label  class="control-label col-sm-3">关联泊位</label>
                      <div class="col-sm-9">
                        <select name='parks_id' id="bs3Select" class="selectpicker show-tick form-control"  data-live-search="true">  
                          <option selected="true" value='0'>请选择泊位</option>
                          {volist name='parks' id='vo'}
                          <option value="{$vo.id}" >{$vo.park_name}</option>  
                          {/volist}
                        </select>
                      </div>
                    </div>

                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">长*宽*高(mm)</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control" name="size" id="firstname" value="{$list.size}" 
                            placeholder="例，5999*2420*3034">
                      </div>
                    </div>

                    <div class="form-group">
                      <label for="firstname" class="col-sm-3 control-label">核载人数</label>
                      <div class="col-sm-9">
                         <input type="text" class="form-control"  name="sofe_num" id="firstname" value="{$list.sofe_num}" 
                            placeholder="请直接填写阿拉伯数字"></input>
                      </div>
                    </div>

                    <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-3">国别</label>
                       {foreach $country as $k => $v}
                      <label class="radio-inline">
                       {if $list.country==$k}
                        <input id="country{$k}" name="car_countries_id" checked="true" value="{$k}" type="radio">{$v}
                        {else}
                        <input id="country{$k}" name="car_countries_id" value="{$k}" type="radio">{$v}
                        {/if}
                      </label>
                       {/foreach}  
                    </div>
                    <div class="form-group ">
                      <label class="control-label col-sm-3">准驾类型</label>
                      {foreach $drive_type as $k => $v}
                      {if in_array($k,$list.drive_type)}
                        <input type="checkbox" name="drive_type_id[]" checked="true" value="{$k}">{$v}</input>
                      {else/}
                        <input type="checkbox" name="drive_type_id[]"  value="{$k}">{$v}</input>
                      {/if}  

                      {/foreach} 
                    </div>

                    <div class="form-group">
                      <label for="firstname" class="control-label col-sm-3">燃油</label>
                      {foreach $fuel as $k => $v}
                      <label class="radio-inline">
                      {if $list.fuel==$k}
                        <input id="fuel{$k}" checked="true" name="fuel" value="{$k}" type="radio">{$v}
                      {else} 
                        <input id="fuel{$k}"  name="fuel" value="{$k}" type="radio">{$v}
                      {/if}
                      </label>
                      {/foreach}  
                    </div>
                  </div>
                </div>
              </div>
              <!-- 基本信息end -->
              <!-- 车内配套设施start -->
              <div class="col-lg-6">
                <div class="panel panel-default">
                  <div class="panel-heading">
                    <h3 class="panel-title">
                      车内配套设施
                    </h3>
                  </div>
                  <div class="panel-body">
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">单人床数量(张)</label>
                      <div class="col-sm-2">
                         <input type="text" class="form-control" name="single_bed_num" id="firstname" value="{$list.single_bed_num}" 
                            placeholder="8"></input>
                      </div>
                      <div class="col-sm-6">
                         <input type="text" class="form-control" id="firstname" 
                        name='single_bed_size' value="{$list.single_bed_size}"   placeholder="长*宽(mm):例,1300*2100"></input>
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">双人床数量(张)</label>
                      <div class="col-sm-2">
                         <input type="text" class="form-control" name="double_bed_num" id="firstname" value="{$list.double_bed_num}" 
                            placeholder="8"></input>
                      </div>
                      <div class="col-sm-6">
                         <input type="text" class="form-control" name="double_bed_size" id="firstname" value="{$list.double_bed_size}"
                            placeholder="长*宽(mm):例,1300*2100"></input>
                      </div>
                    </div>
                    
                  {foreach $ziduan2 as $key=>$value}
                  <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-4">{$key|lang}</label>
                      {foreach $value as $k=>$v} 
                      <label class="radio-inline">                 
                      {if $list[$key]==$k}
                      <input id="{$key.$k}" name="{$key}" checked="true" value="{$k}" type="radio">{$v|lang}
                      {else}
                      <input id="{$key.$k}" name="{$key}" value="{$k}"  type="radio">{$v|lang}
                      {/if}
                      </label>
                  {/foreach}
                  </div>
                {/foreach}
              </div>
              </div>
            </div>
              <!-- 车内配套设施end -->
              <!-- 房车外设信息start -->
              <div class="col-lg-6">
                <div class="panel panel-default">
                  <div class="panel-heading">
                    <h3 class="panel-title">
                      房车外设信息
                    </h3>
                  </div>
                  <div class="panel-body">
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">车身结构</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" name="body_structure" id="firstname" value="{$list.body_structure}" 
                            placeholder="例，三明治复合式车身">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">车身材质</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control"  name="body_material" id="firstname" value="{$list.body_material}" 
                            placeholder="例，玻璃钢">
                      </div>
                    </div>
                  {foreach $ziduan3 as $key=>$value}
                  <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-4">{$key|lang}</label>
                      {foreach $value as $k=>$v}
                      <label class="radio-inline">
                      {if $list[$key]==$k}
                      <input id="{$key.$k}" name="{$key}" checked="true" value="{$k}" type="radio">{$v|lang}
                      {else}
                      <input id="{$key.$k}" name="{$key}" value="{$k}"  type="radio">{$v|lang}
                      {/if}
                      </label>
                      {/foreach}
                  </div>
                  {/foreach}
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">行李箱容积(L)</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" name="trunk_volume" id="firstname" value="{$list.trunk_volume}" 
                            placeholder="请直接填写阿拉伯数字">
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <!-- 房车外设信息end -->
              <!-- 供电供水供暖安全信息start -->
              <div class="col-lg-6">
                <div class="panel panel-default">
                  <div class="panel-heading ">
                    <h3 class="panel-title">
                      供电/供水/供暖/安全
                    </h3>
                  </div>
                  <div class="panel-body">
                    <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-4">中央控制面板</label>
                      {if $list.the_central_control_panel==1}
                      <label class="radio-inline">
                        <input id="central-console1" name="the_central_control_panel" checked="true" value="1" type="radio">有
                      </label>
                      <label class="radio-inline">
                        <input id="central-console2" name="the_central_control_panel" value="2" type="radio">无
                      </label>
                      {elseif $list.the_central_control_panel==2}
                      <label class="radio-inline">
                      <input id="central-console1" name="the_central_control_panel"  value="1" type="radio">有
                      </label>
                      <label class="radio-inline">
                      <input id="central-console2" name="the_central_control_panel" checked="true" value="2" type="radio">无
                      </label>
                      {else}
                      <label class="radio-inline">
                      <input id="central-console1" name="the_central_control_panel"  value="1" type="radio">有
                      </label>
                      <label class="radio-inline">
                        <input id="central-console2" name="the_central_control_panel" value="2" type="radio">无
                      </label>
                      {/if}
                    </div>

                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">电瓶数量</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" name="battery_num" id="firstname" value="{$list.battery_num}" placeholder="请直接填写阿拉伯数字">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">电瓶电量(A)</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" name="battery_capacity" id="firstname" value="{$list.battery_capacity}" 
                            placeholder="请直接填写阿拉伯数字">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">逆变器功率(W)</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" name="inverter_power" id="firstname" value="{$list.inverter_power}" 
                            placeholder="请直接填写阿拉伯数字">
                      </div>
                    </div>
                    <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-4">房车专用水泵</label>
                   {if $list.rv_dedicated_pump==1}
                      <label class="radio-inline">
                        <input id="central-console1" name="rv_dedicated_pump" checked="true" value="1" type="radio">有
                      </label>
                      <label class="radio-inline">
                        <input id="central-console2" name="rv_dedicated_pump" value="2" type="radio">无
                      </label>
                      {elseif $list.rv_dedicated_pump==2}
                      <label class="radio-inline">
                      <input id="central-console1" name="rv_dedicated_pump"  value="1" type="radio">有
                      </label>
                      <label class="radio-inline">
                      <input id="central-console2" name="rv_dedicated_pump" checked="true" value="2" type="radio">无
                      </label>
                      {else}
                      <label class="radio-inline">
                      <input id="central-console1" name="rv_dedicated_pump"  value="1" type="radio">有
                      </label>
                      <label class="radio-inline">
                        <input id="central-console2" name="rv_dedicated_pump" value="2" type="radio">无
                      </label>
                      {/if}
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">净水箱容积(L)</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" name="tank_volume" value="{$list.tank_volume}" id="firstname" ">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">灰水箱容积(L)</label>
                      <div class="col-sm-2">
                         <input type="text" class="form-control" name="grey_tank_volume" value="{$list.grey_tank_volume}" id="firstname" ">
                      </div>
                      <label for="firstname" class="col-sm-4 control-label">黑水箱容积(L)</label>
                      <div class="col-sm-2">
                         <input type="text" class="form-control" name="black_tank_volume" value="{$list.black_tank_volume}" id="firstname">
                      </div>
                    </div>
                  {foreach $ziduan5 as $key=>$value}
                    <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-4">{$key|lang}</label>
                      {foreach $value as $k=>$v}
                      <label class="radio-inline">
                      {if $list[$key]==$k}
                      <input id="{$key.$k}" name="{$key}" checked="true" value="{$k}" type="radio">{$v|lang}
                      {else}
                      <input id="{$key.$k}" name="{$key}" value="{$k}"  type="radio">{$v|lang}
                      {/if}
                      </label>
                      {/foreach}
                     </div>
                  {/foreach}                   
                    <div class="form-group ">          
                      <label class="control-label col-sm-3">安全系统</label>
                      {foreach $security_system as $k => $v}
                      <label class="checkbox-inline">               
                        {if in_array($k,$list.security_system)}               
                        <input  name="security_system[]" value="{$k}" checked="true" type="checkbox">{$v} </input> 
                      {else/}
                        <input  name="security_system[]" value="{$k}"  type="checkbox">{$v} </input> 
                     {/if}
                 
                      </label>
                      {/foreach} 
                    </div>
                  </div>
                </div>
              </div>
              <!-- 供电供水供暖信息end -->
              <div class="col-md-6 col-md-offset-6">
              <a href="#two" data-toggle="tab" class="btn btn-primary">下一步</a>
              </div>
          <!--   </form> -->
          </div>
          <!-- 选项卡内容1end -->
          <!-- 选项卡内容2start -->
          <div id="two" class="tab-pane fade">
          <!-- 房车门窗/房车车灯/后视镜/雨刷内容start -->
              {foreach $ziduan as $key=>$value}
              <div class="col-lg-4">
              <div class="panel panel-default">
              <div class="panel-heading ">
                    <h3 class="panel-title">
                      {$key|lang}
                    </h3>
                  </div>
                <div class="panel-body">
                {foreach $value as $ke=>$va}
                    <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-5">{$ke|lang}</label>
                      {foreach $va as $k=>$v}
                      <label class="radio-inline">
                      {if $list[$ke]==$k}
                        <input id="{$ke.$k}" name="{$ke}" checked="true" value="{$k}" type="radio">{$v|lang}
                      {else}
                        <input id="{$ke.$k}" name="{$ke}" value="{$k}"  type="radio">{$v|lang}
                      {/if}
                      </label>
                      {/foreach}
                    </div>
                  {/foreach} 
                  </div>
                </div>
              </div>    
             {/foreach} 
             <!-- 房车门窗/房车车灯/后视镜/雨刷内容end --> 
             <!-- 底盘/动力start -->
            {foreach $ziduan1 as $key=>$value}
              <div class="col-lg-6">
              <div class="panel panel-default">
              <div class="panel-heading ">
                    <h3 class="panel-title">
                      {$key|lang}
                    </h3>
                  </div>
                  <div class="panel-body">
                  {foreach $value as $ke=>$va}
                    <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-5">{$ke|lang}</label>
                      {foreach $va as $k=>$v}
                      <label class="radio-inline">
                      {if $list[$ke]==$k}
                        <input id="{$ke.$k}" name="{$ke}" checked="true" value="{$k}" type="radio">{$v|lang}
                      {else}
                        <input id="{$ke.$k}" name="{$ke}" value="{$k}"  type="radio">{$v|lang}
                      {/if}
                      </label>
                      {/foreach}
                    </div>
                  {/foreach} 
                  </div>
                </div>
              </div>    
             {/foreach}    
            <!-- 底盘/动力end -->
            <!-- 发动机/变速器/车轮start -->
            <div class="col-lg-6">
                <div class="panel panel-default">
                  <div class="panel-heading">
                    <h3 class="panel-title">
                      发动机/变速器/车轮
                    </h3>
                  </div>
                  <div class="panel-body">
                  {foreach $ziduan4 as $key=>$value}
                  <div class="form-group ">
                      <label for="firstname" class="control-label col-sm-4">{$key|lang}</label>
                      {foreach $value as $k=>$v} 
                      <label class="radio-inline">                 
                      {if $list[$key]==$k}
                      <input id="{$key.$k}" name="{$key}" checked="true" value="{$k}" type="radio">{$v|lang}
                      {else}
                      <input id="{$key.$k}" name="{$key}" value="{$k}"  type="radio">{$v|lang}
                      {/if}
                      </label>
                      {/foreach}
                  </div>
                  {/foreach}  
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">汽缸数</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" id="firstname" name="cylinder_num" value="{$list.cylinder_num}" 
                            placeholder="请正确填写排量">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">发动机马力</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" id="firstname" name="engine_horsepower" value="{$list.engine_horsepower}" 
                            placeholder="请正确填写发动机马力">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">排量</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" id="firstname" name="displacement" value="{$list.displacement}" 
                            placeholder="请正确填写排量">
                      </div>
                    </div>
                    <div class="form-group">
                      <label for="firstname" class="col-sm-4 control-label">发动机功率</label>
                      <div class="col-sm-8">
                         <input type="text" class="form-control" id="firstname" name="engine_power" value="{$list.engine_power}" 
                            placeholder="请正确填写功率">
                      </div>
                  </div>
                </div>
              </div>
           </div>
              <!-- 发动机/变速器/车轮end -->
              <div class="col-md-6 col-md-offset-6">
              <a href="#one" data-toggle="tab" class="btn btn-link" type="submit">返回</a>
              <button class="btn btn-primary" type="submit">提交</button>
              </div>
            </form>
          </div>
          <!-- 选项卡内容2end -->
        </div>
        <!-- 选项卡内容end -->
      </div>
      <!-- 选项卡end -->
    </div>

  </div><!-- /#page-wrapper -->

